<template>
  <t-btn-group
    ref="btngroup"
    :staticItems="items"
    btnSpace="8px"
    :moreConf="true"
    :moreMaxCount="5"
    :autoModel="false"
    @btnGroupItemClick="btnGroupItemClick"
    :tabindex="10"
  />
</template>

<script setup>
import { onMounted, ref } from 'vue';
const btngroup = ref();
onMounted(() => {});
const btnGroupItemClick = function (val) {
  console.log(val);
};
const items = [
  {
    label: '保存',
    text: '',
    value: '1',
    icon: '',
    type: 'primary',
    hint: '保存...',
    visible: true,
    disabled: true,
  },
  {
    label: '另存为',
    text: '另存为',
    value: '2',
    icon: '',
    type: '',
    hint: '另存为...',
    visible: true,
    disabled: false,
  },
  {
    label: '保存·发布',
    text: '保存·发布',
    value: '3',
    icon: '',
    type: '',
    hint: '保存并发布...',
    visible: true,
    disabled: false,
  },
  {
    label: '编辑',
    text: '编辑',
    value: '4',
    icon: '',
    type: '',
    hint: '保存...',
    visible: true,
    disabled: false,
  },
  {
    label: '删除',
    text: '删除',
    value: '5',
    icon: '',
    type: '',
    hint: '另存为...',
    visible: true,
    disabled: false,
  },
  {
    label: '复制',
    text: '复制',
    value: '6',
    icon: '',
    type: '',
    hint: '保存并发布...',
    visible: true,
    disabled: false,
  },
  {
    label: '更新',
    text: '更新',
    value: '7',
    icon: '',
    type: '',
    hint: '保存并发布...',
    visible: true,
    disabled: false,
  },
  {
    label: '新增',
    text: '新增',
    value: '8',
    icon: '',
    type: '',
    hint: '保存并发布...',
    visible: true,
    disabled: false,
  },
  {
    label: '你好',
    text: '你好',
    value: '9',
    icon: '',
    type: '',
    hint: '保存并发布...',
    visible: true,
    disabled: false,
  },
];
</script>
